import librosa

class AudioAnalyzer:
    def analyze_bpm(self, audio_file: str) -> float:
        """分析BPM"""
        y, sr = librosa.load(audio_file)
        tempo, _ = librosa.beat.beat_track(y=y, sr=sr)
        return tempo